home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Extensions… / PostScript Extension Shell ƒ / PS Extension.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-20  |  2.2 KB  |  77 lines  |  [TEXT/MPS ]

  1. /*________________________________________________________
  2.  
  3.     File: PS Extension.h
  4.  
  5.     C header file for a printing extension.
  6.  
  7.     Dave Hersey
  8.     Apple Developer Technical Support
  9.  
  10.     (Based on the "Extension Shell" sample.)
  11.  
  12.     12/01/92 - dmh - Created.
  13.      4/26/93 - dmh - Updated to use recommended approach
  14.                       to global data initialization.
  15.      9/05/93 - dmh - Updated for b2.
  16.                     - Fixed minor problem with highlighting
  17.                      of editText panel items.
  18.                    - Switched to Exception.h assertion stuff
  19.                      for error checking.
  20.      9/08/93 - dmh - Modified to override
  21.                       GXPostScriptDoPageSetup.
  22.                    - Added a "PS " before the file names.
  23.                    - Changed creator type.
  24.     12/18/93 - dmh - Updated for b3.
  25.      3/22/94 - dmh - Updated for b4.
  26.  
  27.     (Note: labels are in the Mark menu.)
  28.     
  29. __________________________________________________________*/
  30.  
  31. #include <Types.h>
  32. #include <Errors.h>
  33. #include <Resources.h>
  34. #include <ToolUtils.h>
  35. #include <GXMath.h>
  36. #include <GXExceptions.h>
  37. #include <GXGraphics.h>
  38. #include <GXEnvironment.h>
  39. #include <Collections.h>
  40. #include <GXMessages.h>
  41. #include <GXPrinterDrivers.h>
  42. #include <GXPrinting.h>
  43.  
  44.  
  45. #define kCreator                    'GPxt'            /* Our creator type.            */
  46. #define kExtensionCollectionType    kCreator        /* The collection type we use.    */
  47.  
  48. #define r_ExtensionPanel            6000            /* The ID of our dialog panel.    */
  49. #define kExtensionTurnedOff            0                /* We're turned on.                */
  50. #define kExtensionTurnedOn            1                /* We're turned off.            */
  51.  
  52. #define kDefaultSetting            kExtensionTurnedOn    /* We're on by default.            */
  53.  
  54.  
  55. typedef struct ExtensionCollection                    /* This is our collection type.    */
  56. {
  57.     char    extTurnedOn;                            /* On/off panel item value.        */
  58.     char    fillByte;
  59. } ExtensionCollection;
  60.  
  61.  
  62. // Prototypes:
  63.  
  64. extern    long A5Size (void);                            /* We need these to set up        */
  65. extern    void A5Init (void *);                        /* our A5 world.                */
  66.  
  67. OSErr    InitGlobalData(void);
  68. OSErr    NewInitialize(void);
  69. OSErr    NewShutDown(void);
  70. OSErr    NewPSDoPageSetup(gxFormat aFormat, long pageNum,
  71.                          gxPostScriptImageDataHdl aDataHdl);
  72. OSErr    NewJobPrintDialog(gxDialogResult *dlogResult);
  73. OSErr    NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
  74. OSErr    SetUpPrintPanel(void);
  75. OSErr    GetJobCollectionItem(void *collectItem, long *collectSize,
  76.                              OSType collectType, short collectID);
  77.